package com.qwt.part_time_api.service.impl;

import com.qwt.part_time_api.mapper.PersonalInformationMapper;
import com.qwt.part_time_api.pojo.PersonalInformation;
import com.qwt.part_time_api.service.PersonalInformationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author 君子慎独
 * @create 2022/1/22 0022 2:56
 */

@Service
@Slf4j
public class PersonalInformationServiceImpl implements PersonalInformationService {

    @Autowired
    private PersonalInformationMapper personalInformationMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public int savePersonalInformation(PersonalInformation personalInformation) {
        log.info("添加用户主表信息");
        return personalInformationMapper.insert(personalInformation);
    }
}
